package com.yingma.common.controller;


import com.yingma.common.util.AjaxResult;

import com.yingma.system.entity.JcCarrier;
import com.yingma.system.service.JcCarrierService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * (JcCarrier)表控制层
 *
 * @author makejava
 * @since 2020-04-03 19:31:25
 */
@RestController
@RequestMapping("jcCarrier")
public class JcCarrierController {
    /**
     * 服务对象
     */
    @Resource
    private JcCarrierService jcCarrierService;

    /**
     * 根据条件查询信息
     * @param name
     * @param code
     * @param pageNum
     * @param pageSize
     * @return
     */
    @ApiOperation("根据条件查询承运商信息")
    @PostMapping("searchCarrier")
    public AjaxResult selectOne(String name, String code, Integer pageNum, Integer pageSize) {
       List<JcCarrier> list= jcCarrierService.searchbycondition(name, code, pageNum, pageSize);
        return AjaxResult.success(list);
    }

}
